<select name="set_id" <?=$estilo;?>>
    <option value="">Sector</option>
    <?php
    $sql_setor = "SELECT * FROM setor WHERE status='1' $ondesetor ORDER BY set_nome";
    $res_setor = sql($sql_setor);
    while($linha_setor = mysql_fetch_array($res_setor)){
    ?>
    <option value="<?=$linha_setor['set_id'];?>" <?php if($linha_setor['set_id'] == $set_id) { echo "selected"; } ?>><?=$linha_setor['set_nome'];?></option>
    <?php } ?>

</select>